
public class Main {
    public static void main(String[] args) {
        Computer computer=new Computer();
        //打开电脑
        computer.powerOn();
        //使用鼠标
        computer.useDevice(new Mouse());
        //使用键盘
        computer.useDevice(new KeyBoard());
        //关闭电脑
        computer.powerOff();
    }
}
